window.isSearchBot=!1;if(/Bot/i.test(navigator.userAgent)){window.isSearchBot=!0} window.isMobile=!1;window.$isMobile=!1;if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){window.isMobile=!0;window.$isMobile=!0} window.browserLang=(window.navigator.userLanguage||window.navigator.language).toUpperCase().slice(0,2);window.tildaBrowserLang=window.browserLang;(function($){var statsApiUrl='https://sstat.tildacdn.com/';var loadingStats={};$(document).ready(function(){loadingStats.ready=Date.now()-window.performance.timing.navigationStart;var userAgent=window.navigator.userAgent;var isInstagram=userAgent.indexOf('Instagram')!==-1;var isFacebook=userAgent.indexOf('FBAV')!==-1;var isYandex=userAgent.indexOf('YaSearchBrowser')!==-1;var isSamsung=userAgent.indexOf('SamsungBrowser')!==-1;var isAndroid=userAgent.indexOf('Android')!==-1;if(isAndroid&&(isFacebook||isInstagram||isYandex||isSamsung)){var textElement=document.createElement('p');textElement.style.lineHeight='100px';textElement.style.padding='0';textElement.style.margin='0';textElement.style.height='auto';textElement.style.position='absolute';textElement.style.opacity='0.001';textElement.innerText='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';document.body.appendChild(textElement);var factor=100/textElement.getBoundingClientRect().height;textElement.parentNode.removeChild(textElement);if(factor<0.98){$('body').append('')}} var isIphone=userAgent.indexOf('iPhone')!==-1;if(isIphone&&isInstagram){$(window).scroll(t_throttle(function(){var offset=Math.abs(document.documentElement.clientHeight-window.innerHeight);if(offset===0){if($('#instagramfixclosingpanel').length===0){$('body').append('')}}else{$('#instagramfixclosingpanel').remove()}},200))}});$(window).load(function(){var tildaExport=$('#allrecords').attr('data-tilda-export');if(tildaExport!=='yes'){loadingStats.load=Date.now()-window.performance.timing.navigationStart;loadingStats.connect=window.performance.timing.connectEnd-window.performance.timing.connectStart;loadingStats.ttfb=window.performance.timing.responseStart-window.performance.timing.connectEnd;loadingStats.basePage=window.performance.timing.responseEnd-window.performance.timing.navigationStart;loadingStats.DOMcontentLoaded=window.performance.timing.domContentLoadedEventEnd-window.performance.timing.navigationStart;loadingStats.fullLoad=window.performance.timing.domComplete-window.performance.timing.navigationStart;loadingStats.lazy=window.lazy==='y';loadingStats.zero=$('.tn-elem').length>0;if(window.winWidth&&window.winWidth>0)loadingStats.width=window.winWidth;var params=($isMobile?'site_m':'site_d')+'='+JSON.stringify(loadingStats);$.post(statsApiUrl+'?'+params)}});$isMobile=!1;if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){$isMobile=!0} if(/Bot/i.test(navigator.userAgent)){window.isSearchBot=!0} window.isMobile=$isMobile;if($isMobile==!0){var correctHeight=function(){var coverCarries=document.body.querySelectorAll('.t-cover__carrier'),viewPortHeight=$(window).height(),factor=0;for(var i=0,l=coverCarries.length,cc,ccStyle,newHeight,parent,opacityLayer,textBox;i-1){factor=parseInt(ccStyle.height,10)/100;newHeight=Math.round(viewPortHeight*factor)+'px';parent=$(cc).parent('.t-cover');if(parent&&(parent=parent[0])){opacityLayer=parent.querySelector('.t-cover__filter');textBox=parent.querySelector('.t-cover__wrapper');if(opacityLayer){opacityLayer.style.height=newHeight} if(textBox){textBox.style.height=newHeight} ccStyle.height=parent.style.height=newHeight}}} var elCarries=document.body.querySelectorAll('[data-height-correct-vh]'),viewPortHeight=$(window).height(),factor=0;for(var i=0,l=elCarries.length,cc,ccStyle,newHeight,parent,opacityLayer,textBox;i-1){factor=parseInt(ccStyle.height)/100;newHeight=viewPortHeight+'px';parent=$(cc).parent('.t-cover');ccStyle.height=newHeight}}};$(document).ready(function(){setTimeout(function(){correctHeight()},400)});$(window).load(function(){setTimeout(function(){correctHeight()},400)})} if($isMobile==!0){if($(window).width()<480){$(document).ready(function(){$("div[data-customstyle=yes]").each(function(index){if($(this).css('font-size').replace('px','')>26){$(this).css('font-size','');$(this).css('line-height','')}});$("[field]").find("span").each(function(index){if($(this).css('font-size').replace('px','')>26){$(this).css('font-size','')}});var sta;$(".t-title, .t-name, .t-heading, .t-descr, .t-text, .t-subtitle").not(".tn-elem, .tn-atom").each(function(index){sta=$(this).attr('style');if(typeof sta!='undefined'&&sta!=''&&sta.indexOf('font-size')>-1){if($(this).css('font-size').replace('px','')>26){var newsta=sta.replace('font-size','fontsize').replace('line-height','lineheight');$(this).attr('style',newsta)}}})});$(window).load(function(){var window_width=$(window).width();$(".r:visible").each(function(){var el=$(this);$(this).find("div").not("[data-auto-correct-mobile-width=false], .tn-elem, .tn-atom, .tn-atom__sbs-anim-wrapper, .tn-atom__prx-wrapper, .tn-atom__videoiframe, .tn-atom .t-form *, .tn-atom__sticky-wrapper").each(function(){var r_div_width=parseInt($(this).outerWidth(!0));if((r_div_width)>window_width){console.log('Block not optimized for mobile width. Block width:'+r_div_width+' Block id:'+el.attr('id'));console.log($(this));el.css("overflow","auto");if((r_div_width-3)>window_width){el.css("word-break","break-all")}}})})})}else if($(window).width()<900){$(document).ready(function(){$("div[data-customstyle=yes]").each(function(index){if($(this).css('font-size').replace('px','')>30){$(this).css('font-size','');$(this).css('line-height','')}});$("[field]").find("span").each(function(index){if($(this).css('font-size').replace('px','')>30){$(this).css('font-size','')}});var sta;$(".t-title, .t-name, .t-heading, .t-descr, .t-text, .t-subtitle").not(".tn-elem, .tn-atom").each(function(index){sta=$(this).attr('style');if(typeof sta!='undefined'&&sta!=''&&sta.indexOf('font-size')>-1){if($(this).css('font-size').replace('px','')>30){var newsta=sta.replace('font-size','fontsize').replace('line-height','lineheight');$(this).attr('style',newsta)}}})})}}})(jQuery);(function($){function VideoLoadProcessor(){this.setScrollListener()} VideoLoadProcessor.prototype.videoTags=[];VideoLoadProcessor.prototype.defaultConfig={isNeedStop:!1};VideoLoadProcessor.prototype.videoConfigs=[];VideoLoadProcessor.prototype.registerNewVideo=function(video,config){if(!(video instanceof HTMLVideoElement)){throw new Error("Wrong tag passed into registerNewVideo")} if(this.videoTags.indexOf(video)==-1){this.videoTags.push(video);this.videoConfigs.push(typeof config=="undefined"?this.defaultConfig:config);this.scrollCb('',!0);return!0} return!1} VideoLoadProcessor.prototype.unergisterVideo=function(video){if(!(video instanceof HTMLVideoElement)){throw new Error("Wrong tag passed into unregisterNewVideo")} var index;if((index=this.videoTags.indexOf(video))>-1){if(typeof video.remove=="function"){video.remove()}else{if(video.parentNode){video.parentNode.removeChild(video)}} this.pauseVideo(video,this.videoConfigs[index]);this.videoTags.splice(index,1);this.videoConfigs.splice(index,1);return!0} return!1} VideoLoadProcessor.prototype.pauseVideo=function(video,config){if(!config){throw new Error("Wrong config type!")} video.pause();if(config.isNeedStop){video.load()}} VideoLoadProcessor.prototype.setScrollListener=function(){$(window).bind('scroll',t_throttle(jQuery.proxy(this.scrollCb,this),200))} VideoLoadProcessor.prototype.scrollCb=function(e,firstInvoke){var windowHeight=$(window).height(),_shift=0,_v=null;for(var i=0,l=this.videoTags.length;iwindowHeight/2){var vol=1-(Math.abs(_vrect.top)-windowHeight/2)/(windowHeight/2)-0.2;if(vol>0&&vol<=1&&_v.volume!=0){_v.volume=vol}} if(Math.abs(_vrect.top)>windowHeight||_vrect.height==0){this.pauseVideo(_v,this.videoConfigs[i]);continue} if(firstInvoke){_v.play()} if(_v.paused&&_v.loop){_v.play()}}};VideoLoadProcessor.prototype.getVideoObject=function(video){for(var i=0,l=this.videoTags.length;i>l;i++){var vo=this.videoTags[i];if(vo.v===video){return vo}} return null} VideoLoadProcessor.prototype.getVideoBoundingRect=function(video,isNeedParent){if(typeof isNeedParent=="undefined"){isNeedParent=!0} var parent=null;if(isNeedParent){parent=$(video).parents('.r')[0];if(!parent){parent=video}}else{parent=video} return parent.getBoundingClientRect()} window.videoLoadProcessor=new VideoLoadProcessor()})(jQuery);(function($){function SequenceController(){this.setScrollCb();this.itemHeight=screen.availHeight;var itemTransitionItemRelation=0.25;this.itemTransitionTop=this.itemHeight*itemTransitionItemRelation;this.activeItemIndex=null;this.windowHeight=document.documentElement.clientHeight||window.innerHeight||screen.availHeight;this.topOffsetShift=-150;$(window).resize(jQuery.proxy(this.recalculateAllSequencesOffsets,this));this._resizeInterval=setInterval(jQuery.proxy(this.scrollCb,this),500)} SequenceController.prototype.defaultConfig={orientation:"vertical",speedFactor:1,automated:!1};SequenceController.prototype.sequenceObjects=[];SequenceController.prototype.recalculateAllSequencesOffsets=function(){if(this._resizeTimeout){clearTimeout(this._resizeTimeout)} if(this._resizeInterval){clearInterval(this._resizeInterval)} this._resizeTimeout=setTimeout(jQuery.proxy(function(){this.scrollCb();this._resizeInterval=setInterval(jQuery.proxy(this.scrollCb,this),500)},this),10)} SequenceController.prototype.registerNewBlock=function(node){if(!(node instanceof HTMLElement)){throw new Error("Wrong node type in registerNewBlock")} for(var i=0,l=this.sequenceObjects.length;ithis.itemTransitionTop){currentItemIndex=i;break}} if(currentItemIndex==null){return} opacity=nodeRect.top/this.itemTransitionTop;if(opacity>1){opacity=1}else{if(opacity<0){opacity=0}} for(var i=0,l=sequenceItems.length;i0&&boundingRect.bottom>boundingRect.height-sO.sequenceHeight-100){this.processSequence(sO)}else{this.stopSequence(sO)}}} SequenceController.prototype.setScrollCb=function(){this._scrollCb=jQuery.proxy(this.scrollCb,this);$(window).bind('scroll',t_throttle(this._scrollCb,200))} window.sequenceController=new SequenceController();window.processVideo=function(v){mp4Src=$(v).attr('data-content-video-url-mp4');webmSrc=$(v).attr('data-content-video-url-webm');$(v).css("background-color","transparent");$(v).css("background-image","");var options={mp4:mp4Src,webm:webmSrc,preload:"none",autoplay:!1,loop:!0,scale:!0,zIndex:0,width:"100%"};vid=$(v).videoBG(options);videoLoadProcessor.registerNewVideo(vid,{isNeedStop:!1})} window.cover_init=function(id){$(document).ready(function(){var cover_carrier=document.body.querySelector('#coverCarry'+id);var el=$(cover_carrier);var backgroundurl=el.attr('data-content-cover-bg');var height=el.attr('data-content-cover-height');var parallax=el.attr('data-content-cover-parallax');var videomp4=el.attr('data-content-video-url-mp4');var videowebm=el.attr('data-content-video-url-webm');var youtubeid=el.attr('data-content-video-url-youtube');var noloop=el.attr('data-content-video-noloop');var nomute=el.attr('data-content-video-nomute');var bgbase64=el.attr('data-content-bg-base64');var video_nocover=el.attr('data-content-video-nocover');if(!backgroundurl){backgroundurl=""};if(!height){height=""} if(!parallax){parallax=""} if(!videomp4){videomp4=""} if(!videowebm){videowebm=""} if(!youtubeid){youtubeid=""} if(!noloop){noloop=""} if(!nomute){nomute=""} if(!youtubeid){youtubeid=""} if(!bgbase64){bgbase64=""} if(video_nocover&&video_nocover=='yes'){videomp4="";videowebm="";youtubeid=""} if($isMobile&&(videowebm!=""||videomp4!=""||youtubeid!="")){el.css('background-image',"url('"+backgroundurl+"')")} setTimeout(function(){cover_fixcontentheight(id)},500);var clogo=$("#rec"+id).find("img[data-hook-clogo]");if(clogo.length){clogo.load(function(){setTimeout(function(){cover_fixcontentheight(id)},500)})} if($isMobile){$(window).on("orientationchange",function(){cover_fixcontentheight(id)})} if(videomp4!==""||videowebm!==""||youtubeid!==""){if($isMobile==!1){if(youtubeid==""&&(videomp4!=""||videowebm!="")) {el.css("background-color","#000000");el.css("background-image","url('https://tilda.ws/img/spinner-white.gif')");el.css("background-size","auto");el.attr('data-content-cover-bg','');var loop=!1;var muted=!0;if(noloop!=''){loop=!1}else{loop=!0} if(nomute!=''){muted=!1}else{muted=!0} var height_more_vh="";if(parallax=="fixed"){if(height.indexOf('vh')>-1){if(parseInt(height)>100){el.css("height","100vh");height_more_vh="yes"}} if(height.indexOf('px')>-1){if(parseInt(height)>$(window).height()){el.css("height","100vh");height_more_vh="yes"}}} var cotimer;var flagprocessed="";var wnd=$(window);var prnt=el.parent();wnd.scroll(function(){if(cotimer){window.clearTimeout(cotimer)} cotimer=window.setTimeout(function(){if(!(flagprocessed>0)){var a,b,c,d,s;a=el.offset().top;b=el.height();c=wnd.scrollTop();d=wnd.height();if(((c+d)>a-500)&&(c<=(a+b+500))){var vid=el.videoBG({mp4:videomp4,webm:videowebm,poster:'',preload:'none',autoplay:'true',loop:loop,muted:muted,volume:1,scale:!0,zIndex:0,width:"100%"});videoLoadProcessor.registerNewVideo(vid);flagprocessed=1}}},100);if(parallax=="fixed"&&height_more_vh=="yes"){var aa,bb,cc,dd,ss;aa=prnt.offset().top;bb=prnt.height();cc=wnd.scrollTop();dd=wnd.height();if(cc>=aa+bb-dd){el.css("position","absolute");el.css("bottom","0px");el.css("top","auto")}else{if(cc>=aa){el.css("position","fixed");el.css("top","0px")}else{if(cc0)){var a,b,c,d,s;a=el.offset().top;b=el.height();c=wnd.scrollTop();d=wnd.height();if(((c+d)>a-500)&&(c<=(a+b+500))){processYoutubeVideo(cover_carrier,height)}}},100)});wnd.scroll()}}}} if(parallax=="dynamic"){if($isMobile==!1)el.parallax("50%",0.2,!0)} if(bgbase64=="yes"&&backgroundurl!=""&&videomp4==""&&videowebm==""&&youtubeid==""){var bg_already="";$('').attr('src',backgroundurl).load(function(){$(this).remove();el.css('background-image',"url('"+backgroundurl+"')");el.css("opacity","1");var bg_already="yes"});if(bg_already!="yes"){el.css('background-image','');el.css("opacity","0");el.css("transition","opacity 25ms")}} var coverarrow=$("#rec"+id).find(".t-cover__arrow-wrapper");if(coverarrow.length>0){coverarrow.click(function(){var recheight=$("#rec"+id).height();if(recheight>0){$('html, body').animate({scrollTop:$("#rec"+id).offset().top+recheight},500)}})}})} function cover_fixcontentheight(id){var el=$("#rec"+id);var hcover=el.find(".t-cover").height();var hcontent=el.find("div[data-hook-content]").outerHeight();if(hcontent>300&&hcover<(hcontent+40)){var hcontent=hcontent+120;if(hcontent>1000){hcontent+=100} console.log('auto correct cover height: '+hcontent);el.find(".t-cover").height(hcontent);el.find(".t-cover__filter").height(hcontent);el.find(".t-cover__carrier").height(hcontent);el.find(".t-cover__wrapper").height(hcontent);if($isMobile==!1){setTimeout(function(){var divvideo=el.find(".t-cover__carrier");if(divvideo.find('iframe').length>0){console.log('correct video from cover_fixcontentheight');setWidthHeightYoutubeVideo(divvideo,hcontent+'px')} if(divvideo.find('video').length>0){console.log('correct html5video from cover_fixcontentheight')}},2000)} if(typeof window.t_lazyload_updateResize_elem==="function"){try{window.t_lazyload_updateResize_elem(el.find('.t-cover__carrier'))}catch(e){console.log('error:'+e)}}else{}}} $(document).ready(function(){$(".t-cover__carrier").each(function(){var id=$(this).attr('data-content-cover-id');if(id>0){cover_init(id)}})});function processSrc(src,nocover,nomute){if(src.indexOf('https://www.youtube.com/embed')==-1){src="https://www.youtube.com/embed"+(src[0]=='/'?src:'/'+src)} var extractVideoId=function(src){var parts=src.split('/'),neededPart=null;for(var i=0,l=parts.length;i=15){timer_player_do(frame,wnd,player,nomute);timer_count=0} timer_count++} timer=window.setTimeout(function(){timer_player_do(frame,wnd,player,nomute);timer_count=0},100)});wnd.scroll()} function timer_player_do(frame,wnd,player,nomute){var a,b,c,d,s;a=frame.offset().top;b=frame.height();c=wnd.scrollTop();d=wnd.height();s=player.getPlayerState();if(((c+d)>a)&&(c<=(a+b))){if(s!==1){player.playVideo()} if(nomute=="yes"){if(c>a+b-100){player.setVolume(30)}else{if(c>a+b-200){player.setVolume(70)}else{if(c+d(a-500)){if(s!==2){player.playVideo();player.pauseVideo()}}else{if(c>(a+b)&&c<(a+b+500)){if(s!==2){player.pauseVideo()}}else{if(s!==2){player.pauseVideo()}}}}} var def=$.Deferred();window.processYoutubeVideo=function(div,height){load_youtube_api();var defFunc=function(){var el=$(div);var src=el.attr('data-content-video-url-youtube');var nomute=el.attr('data-content-video-nomute');var noloop=el.attr('data-content-video-noloop');var nocover=el.attr('data-content-video-nocover');var iframe=document.createElement('iframe');iframe.src=processSrc(src,nocover,nomute);iframe.frameBorder=0;iframe.allow='autoplay';var playtimer;div.appendChild(iframe);if($isMobile==!1){var player=new YT.Player(iframe,{events:{'onReady':function(e){onYouTubePlayerReady_do(div,e.target,nomute);if(e.target.setVolume&&nomute!="yes"){e.target.setVolume(0)} e.target.setLoop(!0)},'onStateChange':function(e){if(e.target.setVolume&&nomute!="yes"){e.target.setVolume(0)} if(e.data===-1){var sp=window.fix_scrolltop_beforestop_youtube;if(sp>=0){$('html, body').scrollTop(sp);delete window.fix_scrolltop_beforestop_youtube}} if(e.data===YT.PlayerState.PLAYING){playtimer=window.setInterval(function(){var a=e.target.getCurrentTime();var b=e.target.getDuration();if(a+1>b&&b!==0){e.target.seekTo(0);if(noloop==="yes"){e.target.stopVideo();e.target.clearVideo()}}},1000)}else{window.clearTimeout(playtimer)}}}})} setWidthHeightYoutubeVideo(el,height)} def.then(defFunc)} function load_youtube_api(){if(window.loadytapi_flag!=='yes'){window.loadytapi_flag='yes';var tag=document.createElement('script');tag.src="https://www.youtube.com/iframe_api";var firstScriptTag=document.getElementsByTagName('script')[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag)}} window.onYouTubeIframeAPIReady=function(){def.resolve()} function setWidthHeightYoutubeVideo(el,height){console.log('setWidthHeightYoutubeVideo:'+height);var iframe=el.find('iframe');var nocover=el.attr('data-content-video-nocover');var noadcut=el.attr('data-content-video-noadcut-youtube');var customratio=el.attr('data-content-video-ratio');var video_ratio=0.5625;if(customratio>0)video_ratio=parseFloat(customratio)*1;if(nocover!="yes"){if(!height){height="100vh"} if(height.indexOf('vh')>-1){var wh=window.innerHeight;if(!wh){wh=$(window).height()} var div_height=Math.floor((wh*(parseInt(height)/100)))}else{var div_height=parseInt(height)} var div_width=Math.floor(parseInt(window.innerWidth));if(!div_width){div_width=$(window).width()} var video_width=div_width;var video_height=video_width*video_ratio;var vw2=video_width;var vh2=video_height;var vh3=video_height;var delta_coef=1;if(noadcut=='yes'){}else{vh2=vh2+110+110;vh3=video_height-220} if((vh3)0){iframe.css('margin-top',-Math.floor(heightDelta/2)+'px')} if(widthDelta>0){iframe.css('margin-left',-Math.floor(widthDelta/2)+'px')}}else{var video_height;if(!height){video_height=Math.floor(el.width()*video_ratio)} if(height&&height.indexOf('vh')>-1){video_height=Math.floor((window.innerHeight*(parseInt(height)/100)))}else{if(height){video_height=parseInt(height)}} iframe.css('width','100%');iframe.height(video_height+'px')}}})(jQuery);(function($){function Observer(){this.callbacks={}} Observer.prototype.defaultConfig={single:!1,context:null};Observer.prototype.addEventListener=function(name,callback,config){evtCallbacks=this._getEventCallbacks(name);if(!evtCallbacks){evtCallbacks=this.callbacks[name]=[]} evtCallbacks.push({callback:callback,config:(typeof config=="object"?config:this.defaultConfig)})} Observer.prototype._getEventCallbacks=function(name){return this.callbacks[name]} Observer.prototype.removeEventListener=function(name,callback){var cbs=this._getEventCallbacks(name);if(!cbs){return!1} for(var i=0,l=cbs.length,cbObj;i1000&&a>b){$(this).addClass('r_hidden')}else{$(this).addClass('r_showed')} $(this).addClass('r_anim')});function blocksfade(){if(tiles.length){for(var i=tiles.length-1,tile,a,b;i>=0;i--){tile=$(tiles[i]);a=tile.offset().top;if(tile.outerHeight()<=100){b=wnd.scrollTop()+wnd.height()}else{b=wnd.scrollTop()+wnd.height()-100} if(amin){if(disp!="block"){$(this).css("display","block")}}else{if(disp!="none"){$(this).css("display","none")}}}})} $(document).ready(function(){setWindowVars();blocksdisplay();$(window).bind('resize',t_throttle(setWindowVars,200));$(window).bind('resize',t_throttle(blocksdisplay,200))})})(jQuery);(function($){function setWidthHeightHTMLVideo(vel,height_1){var el=vel.closest('.t-cover__carrier');var height=height_1+'';console.log('setWidthHeightHTMLVideo:'+height);var iframe=el.find('video');var nocover=el.attr('data-content-video-nocover');var customratio=el.attr('data-content-video-ratio');var video_ratio=0.5625;if(customratio>0)video_ratio=parseFloat(customratio)*1;if(nocover!="yes"){if(!height){height="100vh"} if(height.indexOf('vh')>-1){var wh=window.innerHeight;if(!wh){wh=$(window).height()} var div_height=Math.floor((wh*(parseInt(height)/100)))}else{var div_height=parseInt(height)} var div_width=Math.floor(parseInt(window.innerWidth));if(!div_width){div_width=$(window).width()} var video_width=div_width;var video_height=video_width*video_ratio;var vw2=video_width;var vh2=video_height;var vh3=video_height;var delta_coef=1;if((vh3)0){iframe.css('margin-top',-Math.floor(heightDelta/2)+'px')} if(widthDelta>0){iframe.css('margin-left',-Math.floor(widthDelta/2)+'px')}}else{var video_height;if(!height){video_height=Math.floor(el.width()*video_ratio)} if(height&&height.indexOf('vh')>-1){video_height=Math.floor((window.innerHeight*(parseInt(height)/100)))}else{if(height){video_height=parseInt(height)}} iframe.css('width','100%');iframe.height(video_height+'px')}} $.fn.videoBG=function(selector,options){var options={};if(typeof selector=="object"){options=$.extend({},$.fn.videoBG.defaults,selector)}else{if(!selector){options=$.fn.videoBG.defaults}else{return $(selector).videoBG(options)}} var container=$(this);if(!container.length){return} if(container.css('position')=='static'||!container.css('position')){container.css('position','relative')} if(options.width==0){options.width=container.width()} if(options.height==0){options.height=container.height()} if(options.textReplacement){options.scale=!0;container.width(options.width).height(options.height).css('text-indent','-9999px')}else{} var video=$.fn.videoBG.video(options);if(options.scale){video.height(options.height).width(options.width)} container.append(video);if(typeof container.attr('data-content-video-nomute')==='undefined'){container.find('video').prop('muted',!0)} setWidthHeightHTMLVideo(video,options.height);return video.find("video")[0]} $.fn.videoBG.setFullscreen=function($el){var windowWidth=$(window).width(),windowHeight=$(window).height();$el.css('min-height',0).css('min-width',0);$el.parent().width(windowWidth).height(windowHeight);if(windowWidth/windowHeight>$el.aspectRatio){$el.width(windowWidth).height('auto');var height=$el.height();var shift=(height-windowHeight)/2;if(shift<0){shift=0} $el.css("top",-shift)}else{$el.width('auto').height(windowHeight);var width=$el.width();var shift=(width-windowWidth)/2;if(shift<0){shift=0} $el.css("left",-shift);if(shift===0){var t=setTimeout(function(){$.fn.videoBG.setFullscreen($el)},500)}} $('body > .videoBG_wrapper').width(windowWidth).height(windowHeight)} $.fn.videoBG.video=function(options){var $div=$('
');$div.addClass('videoBG').css('position',options.position).css('z-index',options.zIndex).css('top',0).css('left',0).css('height',options.height).css('width',options.width).css('opacity',options.opacity).css('overflow','hidden');var $video=$('